﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Threading.Tasks;
using Abp.Domain.Repositories;

namespace Xugege.AbpExtension.Core.Extension.BaseInfo
{
    public class BaseTelInfoManager : IBaseTelInfoManager
    {
        private readonly IRepository<BaseTelInfo, long> _baseTelInfoService;

        public BaseTelInfoManager(IRepository<BaseTelInfo, long> baseTelInfoService)
        {
            _baseTelInfoService = baseTelInfoService;
        }

        public Task<BaseTelInfo> Get(string tel)
        {
            return _baseTelInfoService.GetAll().FirstOrDefaultAsync(m => m.Tel == tel);
        }
    }
}
